sequenceDiagram
  Caller          ->>+ Resolvers: Definitions(repo, commit, file, position)
  Resolvers       ->>+ Code Intel API: FindClosestDumps(repo, commit, file)
  Code Intel API  ->>+ Store: FindClosestDumps(repo, commit, file)
  Store          -->>- Code Intel API: dumps
  Code Intel API -->>- Resolvers: dumps

  loop for each dumps[i] (while locations is empty)
    Resolvers         -->>+ Position Adjuster: AdjustPosition(file, position, from: commit, to: dumps[i].commit)
    Position Adjuster -->>- Resolvers: adjusted file, adjusted position
    Resolvers          ->>+ Code Intel API: Definitions(dumps[i], adjusted file, adjusted position)
    Code Intel API     ->>+ LSIF Store: Definitions(dumps[i], adjusted file, adjusted position)
    LSIF Store        -->>- Code Intel API: locations

    alt if locations is empty
    Code Intel API     ->>+ LSIF Store: MonikersByPosition(dump, adjusted file, adjusted position)
      LSIF Store        -->>- Code Intel API: monikers

      loop for each monikers[i] (while locations is empty)
        Code Intel API  ->>+ LSIF Store: PackageInformation(monikers[i])
        LSIF Store     -->>- Code Intel API: package information
        Code Intel API  ->>+ Store: GetPackage(package information)
        Store          -->>- Code Intel API: package dump
        Code Intel API  ->>+ LSIF Store: MonikerResults(package dump, monikers[i])
        LSIF Store     -->>- Code Intel API: locations
      end
    end

    Code Intel API -->>- Resolvers: locations
  end

  Resolvers         -->>+ Position Adjuster: AdjustLocations(locations)
  Position Adjuster -->>- Resolvers: adjusted locations
  Resolvers         -->>- Caller: adjusted locations
